// 获取左树的根节点

import {hrAjax as proFetch} from 'src/hrpub/common/utils/utils';

export default (data) => {

    let type = data.treeType || 'adminOrg';

    if (type === 'psnType') {
        return proFetch({
            url: '/nccloud/hrhi/psndoc/PsndocTreePsnclAction.do'
        });
    } else if (type === 'adminOrg') {
        return proFetch({
            url: '/nccloud/hrhi/psndoc/PsndocTreeAosRootAction.do',
            body: {
                node_type: data.node_type,
                pk_org: data.pk_org
            }
        });
    }
};
